]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: account for the search entry in each control
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 20:36:57 +0000 (15:36 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 17 Feb 2013 18:12:55 +0000 (13:12 -0500)
Account for the search entry space at the bottom (the former message
tray clone) individually in each side control, instead of packing
another actor in the overview.
This allows us to extend the central view all the way to the bottom,
while still keeping controls centered vertically.

https://bugzilla.gnome.org/show_bug.cgi?id=693987

data/theme/gnome-shell.css
js/ui/overview.js
js/ui/overviewControls.js

index d32e405e947a5f53fd70b2f5c9db0789d2cfab66..4f49f3ddd864b8a72b1114be83c21581f781cbe6 100644 (file)
@@ -718,6 +718,7 @@ StScrollBar StButton#vhandle:active {
     -vertical-spacing: 32px;
     padding-left: 32px;
     padding-right: 32px;
+    padding-bottom: 32px;
 }
 
 .window-picker.external-monitor {
@@ -849,13 +850,13 @@ StScrollBar StButton#vhandle:active {
 }
 
 .all-app {
-    padding: 16px 16px 16px 48px;
+    padding: 0px 16px 32px 32px;
     spacing: 20px;
 }
 
 .all-app:rtl {
     padding-left: 16px;
-    padding-right: 48px;
+    padding-right: 32px;
 }
 
 .app-filter {
index afdba1fc0117bf112e36fd1e2541c0561cb48f65..d5787344332c6c06f5d54473f597e5c58a866eda 100644 (file)
@@ -230,7 +230,8 @@ const Overview = new Lang.Class({
         this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
         this._controls = new OverviewControls.ControlsManager(this._dash,
                                                               this._thumbnailsBox,
-                                                              this._viewSelector);
+                                                              this._viewSelector,
+                                                              this._searchEntryBin);
 
         // Pack all the actors into the group
         this._group.add_actor(this._controls.dashActor);
@@ -242,14 +243,6 @@ const Overview = new Lang.Class({
         this._overview.add(this._group, { y_fill: true,
                                           expand: true });
 
-        // Then account for message tray
-        this._messageTrayGhost = new St.Bin({ style_class: 'message-tray-summary',
-                                              reactive: false,
-                                              opacity: 0,
-                                              x_fill: true,
-                                              y_fill: true });
-        this._overview.add_actor(this._messageTrayGhost);
-
         // TODO - recalculate everything when desktop size changes
         this.dashIconSize = this._dash.iconSize;
         this._dash.connect('icon-size-changed',
index f0f309e9e4efd595ab2d9348f5432265294401f5..93420909c73a49e46d7701ac2409c4fee10a0b3d 100644 (file)
@@ -294,15 +294,37 @@ const DashSlider = new Lang.Class({
     }
 });
 
+const SlidingControlContainer = new Lang.Class({
+    Name: 'SlidingControlContainer',
+    Extends: St.Widget,
+
+    _init: function(child, entryBin) {
+        this._layout = new Clutter.BoxLayout({ vertical: true });
+        this.parent({ layout_manager: this._layout });
+
+        child.x_expand = true;
+        this.add_actor(child);
+
+        let entryClone = new St.Widget();
+        entryClone.height = entryBin.height;
+        this.add_actor(entryClone);
+
+        entryBin.connect('notify::height', Lang.bind(this,
+            function() {
+                entryClone.height = entryBin.height;
+            }));
+    }
+});
+
 const ControlsManager = new Lang.Class({
     Name: 'ControlsManager',
 
-    _init: function(dash, thumbnails, viewSelector) {
+    _init: function(dash, thumbnails, viewSelector, entryBin) {
         this._dashSlider = new DashSlider(dash);
-        this.dashActor = this._dashSlider.actor;
+        this.dashActor = new SlidingControlContainer(this._dashSlider.actor, entryBin);
 
         this._thumbnailsSlider = new ThumbnailsSlider(thumbnails);
-        this.thumbnailsActor = this._thumbnailsSlider.actor;
+        this.thumbnailsActor = new SlidingControlContainer(this._thumbnailsSlider.actor, entryBin);
 
         this._viewSelector = viewSelector;
         this._viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));